module.exports = function ($scope, $resource, toaster) {
  var qrcode = '';
  var url = '';
  console.log(window.location.host);
  if (window.location.host == 'tsv.juyouhx.com'){
    url = 'https://weixint.juyouhx.com/views/shop/index_v4.html?cid='
  } else {
    url = 'https://dlqt.juyouhx.com/skv4/views/shop/index_v4.html?cid='
  }
  var cid = '';
  var pwx = 0;
  var companycode = $scope.info.bind_seller_company_code;
  var md5=require("md5") 
  var str=md5(companycode) 
  console.log(str);
  str = str.substring(0, 10);
  cid = companycode.toLowerCase() + str;
  qrcode = url + cid;
  console.log('qrcode:' + qrcode);
  function timing() {
    $('#qrcode').qrcode({ 
        width: 250, 
        height: 250,
        text: qrcode
    });
  }
  timing();



}  